package ar.com.globallogic.promomr.domain;

import java.util.Date;

import org.bson.types.ObjectId;
import org.codehaus.jackson.annotate.JsonIgnore;

import ar.com.globallogic.promomr.exceptions.AnonymousUserException;

public class AnonymousUser extends User {
	
	private String ANONYMOUS = "anonymous";
		
	public String getId() {
		ObjectId objectId = new ObjectId(); 
		return objectId.toStringMongod();
	}

	public String getUserName() {
		return ANONYMOUS;
	}

	@JsonIgnore
	public String getPassword() {
		throw new AnonymousUserException();
	}

	@JsonIgnore
	public String getFirstName() {
		throw new AnonymousUserException();
	}

	@JsonIgnore
	public String getLastName() {
		throw new AnonymousUserException();
	}

	@JsonIgnore
	public Date getDateOfBirth() {
		throw new AnonymousUserException();
	}
	
	@JsonIgnore
	public Gender getGender(){
		throw new AnonymousUserException();
	}
	
	@JsonIgnore
	public Folder getHomeFolder() {
		throw new AnonymousUserException();
	}

	@JsonIgnore
	public boolean isUnderAge(int age){
		throw new AnonymousUserException();
	}

}
